package week2;

import java.math.BigInteger;
import java.util.Scanner;

public class Main5 {
	static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		
		BigInteger a=BigInteger.ZERO;
		while(in.hasNextLine()){
			String b = in.next();
			while(!((b = in.next()).indexOf("e")!=-1)&&((b = in.next()).indexOf("E")!=-1)){
				BigInteger n =new BigInteger(b);
				a=a.add(n);
				
				
			}
			System.out.println(a);
				
				
		}		
	}
	
}
//	static BigDecimal calc(){
//		BigDecimal res = BigDecimal.ZERO;
//		int n = 0;
//		while()
//		for(int i=0;i<n;i++){
//			String temp = in.nextLine();
//			if(temp.equals("e")||temp.equals("E"))
//				System.exit(0);
//			else res=res.add(new BigDecimal(temp));
//		}
//		return res;
//	}

	













/*
import java.util.*;
public class Main5 {
    private static Scanner in;
    public static void main(String[] args)
    {
        in=new Scanner(System.in);
        String s;
        String[] id;
        String k;
        int b[]=new int[100];
        int n,i=0,l=0;
        while(in.hasNext())
        {
            s=in.next();
            switch (s)
            {
                case "fib":
                    n=in.nextInt();
                    for (i = 1; i<= n; i++) {
                        if (i==1)
                            System.out.print(fibs(i));
                        else
                            System.out.print(" "+fibs(i));
                    }
                    System.out.println();
                    break;
                 case "sort":
                     k=in.nextLine();
                     k=in.nextLine();
                    String h[]=k.split(" ");
                    int a[]=new int[h.length];
                    l=h.length;
                    for(i=0;i<h.length;i++)
                    {
                        a[i]=Integer.parseInt(h[i]);
                    }
                    b=a;
                    Arrays.sort(a);
                    ArrayList<Integer> sk=new ArrayList<>();
                    for(i=0;i<h.length;i++)
                    {
                    	sk.add(a[i]);
                    }
                    System.out.println(sk);
                    break;
                case "search":
                    i=in.nextInt();
                    if (l>0)
                    {
                        if(Arrays.binarySearch(b,i)<0)
                            System.out.println(-1);
                        else
                            System.out.println(Arrays.binarySearch(b,i));
                    }
                    else
                        System.out.println(-1);
                    break;
                case "getBirthDate":
                    i=in.nextInt();
                    id=new String[i];
                    input(i,id);
                    for(int e=0;e<i;e++)
                    {
                        System.out.println(id[e].substring(6,10)+"-"+id[e].substring(10,12)+"-"+id[e].substring(12,14));
                    }
                    break;
                default:
                    System.out.println("exit");
                    break;
           }
        }
    }

    public static int fibs(int n)
    {
        if(n <= 2){
            return 1;
        }
        else{
            return fibs(n-1) + fibs(n-2);
        }
    }

    public static void output(int[] a)
    {
        for (int i = 0; i < a.length; i++) {
            if (i==0)
                System.out.print("["+a[i]);
            else
                System.out.print(","+a[i]);
        }
        System.out.print("]");
        System.out.println();
    }

    public static void input(int n,String[] id)
    {
        for(int i=0;i<n;i++)
        {
            id[i]=in.next();
        }
    }

}
*/
